<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>background-size</title>
    <style type="text/css">
        #box1{
            width: 100px;
            height: 100px;
          background-image: url("img/hua.gif");
          background-size: 80px 60px;
        }
        #box2{
            width: 100px;
            height: 100px;
            background-image: url("img/hua.gif");
            background-size:cover;
        }
        #box3{
            width: 100px;
            height: 100px;
            background-image: url("img/hua.gif");
            background-size:contain;
        }
    </style>
</head>
<body>
<p>像素</p>
  <div id="box1">
  </div>
<p>cover</p>
  <div id="box2">
  </div>
<p>contain</p>
  <div id="box3">
  </div>
</body>
</html>